package br.com.guardaroupavirtual.helper;

import java.math.BigDecimal;

public class NumberHelper {

	public static BigDecimal stringToDecimalUS(String number){
		if(number.contains(",")){
			number = number.replace(".", "");
			number = number.replace(",", ".");
		}
		BigDecimal bd = null;
		try{
			bd = new BigDecimal(number);
		}catch(Exception e){
			bd = new BigDecimal("0.00");;
		}
		return bd;
	}
	
}
